package code._16reflect.bean;

/**
 * @description:
 * @author: 景天
 * @date: 2024/4/25 15:49
 **/

public class Person {
    public String name;
    private int age;
    boolean gender;

    public Person(String name, int age, boolean gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    private Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person() {
    }

    private void eat() {
        System.out.println("eat food");
    }

    public void eat(String food) {
        System.out.println("eat "+ food);
    }

    public int sleep() {
        System.out.println("sleep ----");
        return 8;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }
}
